/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package es.miguel.runebound.test;

import java.util.List;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import static org.junit.Assert.*;
import runebound.basedatos.RBConexion;
import runebound.basedatos.Rio;
import runebound.modelo.monstruos.Monstruo;

/**
 *
 * @author malopez
 */
public class RBDatabaseConexionTEST {
    
    public RBDatabaseConexionTEST() {
    }
    
    @BeforeClass
    public static void setUpClass() {
    }
    
    @AfterClass
    public static void tearDownClass() {
    }
    
    @Before
    public void setUp() {
    }
    
    @After
    public void tearDown() {
    }

    @Test
    public void accessMonstruo(){
        Monstruo m = RBConexion.getInstance().getMonstruo(1);
        System.out.println("M:"+m);
        assertNotNull(m);
    }
    
    @Test
    public void accessAllMonstruos(){
        List<Monstruo> monstruos = RBConexion.getInstance().allMonstruo();
        for (Monstruo monstruo : monstruos) {
            System.out.println("M:"+monstruo);
        }
        assertTrue(19==monstruos.size());
    }
    @Test
    public void getRios(){
        List<Rio> rios = RBConexion.getInstance().getRios();
        System.out.println(rios);
        assertTrue(rios.size()>0);
    }
}
